/*
 * @Author: czy
 * @Date: 2021-07-13 15:22:44
 * @LastEditTime: 2021-07-13 15:51:23
 */
#include "sys/system.h"
#include "sys/syscall.h"

#include "process.h"

int createTsk(int (*tskBody)(void))
{
    return _syscall(CREATEPROCESS, (int)tskBody, 0);
}

void destroyTsk(int tskIndex)
{
    _syscall(DESTROYPROCESS, tskIndex, 0);
}

void tskStart(int tskIndex)
{
    _syscall(PROCESSSTART, tskIndex, 0);
}

void tskEnd(void)
{
    _syscall(PROCESSEND, 0, 0);
}